import 'package:flutter/material.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';

///用户： ninetailedfox
///时间： 2020/6/18
///邮箱： 1037438704@qq.com
///功能：  接收人列表  未读和填写



class StatusSelectionListViewModel extends ChangeNotifier{

  List<Widget> listTab = [];

  RefreshController refreshController =
  RefreshController(initialRefresh: false);

  int pageTag;
  BuildContext me;

  StatusSelectionListViewModel({this.me,this.pageTag});

  initView(){
    switch(pageTag){
      case 0:
        listTab.add(Tab(text: "未读"));
        listTab.add(Tab(text: "已读"));
        break;
      case 1:
        listTab.add(Tab(text: "未填写"));
        listTab.add(Tab(text: "已填写"));
        break;
    }
  }

  void onRefresh() async {
    await Future.delayed(Duration(milliseconds: 1000));
    refreshController.refreshCompleted();
    notifyListeners();
  }

  void onLoading() async {
    await Future.delayed(Duration(milliseconds: 1000));
    refreshController.loadComplete();
    notifyListeners();
  }


}